import Layout from '@/layout'
// let prefix = '/laborProtection'
// if (window.__POWERED_BY_QIANKUN__) {
//   prefix = '/' + public_config.MICRO_ROUTE_PREFIX
// }
const LaborProtection = [
  {
    path: '/laborProtection',
    name: 'LaborProtection',
    component: Layout,
    meta: {
      title: '劳保系统'
      // policy: 'LaborProtection.Cashier'
    },
    children: [
      {
        path: '/laborProtection/cashRegister',
        name: 'laborProtection_cashRegister',
        meta: {
          title: '收银台',
          policy: 'LaborProtection.Cashier',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/cashRegister/index.vue')
        // component: () => import('@/views/order')
      }
    ]
  },
  {
    path: '/laborProtection/order',
    name: 'LaborProtection',
    component: Layout,
    redirect: '/laborProtection/order/list',
    meta: {
      title: '订单管理',
      icon: 'icon-dingdan',
      policy:
        'LaborProtection.OrdersReturn||LaborProtection.ProductsLog||LaborProtection.OrdersRemote||LaborProtection.Orders||LaborProtection.OrdersReturnAudit'
    },
    children: [
      {
        path: '/laborProtection/order/list',
        name: 'LaborProtection_order_list',
        meta: {
          title: '收银管理',
          policy: 'LaborProtection.Orders',
          noCache: false
        },
        // hidden: true,
        component: () => import('@/views/LaborProtection/order/index.vue')
      },
      {
        path: '/laborProtection/order/detail',
        name: 'order_detail',
        meta: {
          title: '订单详情',
          noCache: true
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/order/detail.vue')
      },
      {
        path: '/laborProtection/order/returnOrderManage',
        name: 'returnOrderManage',
        meta: {
          title: '退货管理',
          policy: 'LaborProtection.OrdersReturn',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/returnOrderManage/index')
      },
      {
        path: '/laborProtection/order/returnOrderManage/orderExamine',
        name: 'returnOrderManage_orderExamine',
        meta: {
          title: '退货审核',
          policy: 'LaborProtection.OrdersReturnAudit',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/returnOrderManage/orderExamine')
      },
      {
        path: '/laborProtection/order/returnOrderManage/orderExamine/detail',
        name: 'orderExamine_detail',
        meta: {
          title: '退货单审核',
          noCache: true
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/returnOrderManage/orderExamine/detail')
      },
      {
        path: '/laborProtection/order/returnOrderManage/insertReOrder',
        name: 'returnOrderManage_insertReOrder',
        meta: {
          title: '新增退货单',
          noCache: false
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/returnOrderManage/insertReOrder')
      },
      {
        path: '/laborProtection/order/returnOrderManage/detail',
        name: 'returnOrderManage_detail',
        meta: {
          title: '退货单详情',
          noCache: true
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/returnOrderManage/detail')
      },
      {
        path: '/laborProtection/order/returnOrderManage/updateReOrder',
        name: 'returnOrderManage_updateReOrder',
        meta: {
          title: '编辑退货单',
          noCache: false
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/returnOrderManage/updateReOrder')
      },
      {
        path: '/laborProtection/order/remoteOrder',
        name: 'remoteOrder',
        meta: {
          title: '远程单管理',
          policy: 'LaborProtection.OrdersRemote',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/remoteOrder/index')
      },
      {
        path: '/remoteOrder/components/insertOrder',
        name: 'remoteOrder_insertOrder',
        meta: {
          title: '远程单下单',
          noCache: false
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/remoteOrder/components/insertOrder')
      },
      {
        path: '/remoteOrder/components/updateOrder',
        name: 'remoteOrder_updateOrder',
        meta: {
          title: '远程单编辑',
          noCache: false
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/remoteOrder/components/updateOrder')
      },
      {
        path: '/remoteOrder/components/detail',
        name: 'remoteOrder_detail',
        meta: {
          title: '远程单详情',
          noCache: true
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/remoteOrder/components/detail')
      },
      {
        path: '/laborProtection/order/salesFlow',
        name: 'salesFlow',
        meta: {
          title: '产品销售流水记录',
          policy: 'LaborProtection.ProductsLog',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/salesFlow/index')
      }
    ]
  },
  {
    path: '/laborProtection/commodityManage',
    name: 'LaborProtection',
    redirect: '/laborProtection/commodityManage',
    component: Layout,
    alwaysShow: true,
    // redirect: '/commodityManage',
    meta: {
      title: '商品管理',
      icon: 'icon-shangpin',
      policy: 'LaborProtection.Products'
    },
    children: [
      {
        path: '/laborProtection/commodityManage',
        name: 'commodityManage',
        meta: {
          title: '商品列表',
          policy: 'LaborProtection.Products'
        },
        component: () => import('@/views/LaborProtection/commodityManage/index.vue')
      },
      {
        path: '/laborProtection/detail',
        name: 'commodity_detail',
        meta: {
          title: '商品详情列表',
          // policy: 'Logistics.Waybill',
          noCache: true
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/commodityManage/detail.vue')
      },
      {
        path: '/laborProtection/edit',
        name: 'commodity_edit',
        meta: {
          title: '商品编辑',
          // policy: 'Logistics.Waybill',
          noCache: false
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/commodityManage/edit.vue')
      },
      {
        path: '/laborProtection/insert',
        name: 'commodity_insert',
        meta: {
          title: '商品新增',
          // policy: 'Logistics.Waybill',
          noCache: false
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/commodityManage/insert')
      }
    ]
  },
  {
    path: '/laborProtection/inventoryControl',
    name: 'LaborProtection',
    component: Layout,
    alwaysShow: true,
    redirect: '/laborProtection/inventoryControl',
    meta: {
      title: '库存管理',
      icon: 'icon-express-package-full',
      policy: 'LaborProtection.ProductInventory||LaborProtection.ProductInventoryLog'
    },
    children: [
      {
        path: '/laborProtection/inventoryControl',
        name: 'inventoryManage',
        meta: {
          title: '库存列表',
          policy: 'LaborProtection.ProductInventory',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/inventoryControl/index.vue')
      },
      {
        path: '/laborProtection/control',
        name: 'inventory_control',
        meta: {
          title: '库存调整',
          noCache: false
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/inventoryControl/control.vue')
      },
      {
        path: '/laborProtection/inventoryControl/flowRecord/index',
        name: 'flowRecord',
        meta: {
          title: '库存流水记录',
          policy: 'LaborProtection.ProductInventoryLog',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/inventoryControl/flowRecord/index.vue')
      }
    ]
  },
  {
    path: '/laborProtection/reportManagement',
    name: 'LaborProtection',
    component: Layout,
    alwaysShow: true,
    redirect: '/laborProtection/reportManagement',
    meta: {
      title: '报表管理',
      icon: 'icon-baobiaozhongxin',
      policy: 'LaborProtection.Employee.ConsumeStatistics'
    },
    children: [
      {
        path: '/laborProtection/reportManagement',
        name: 'reportManagement',
        meta: {
          title: '员工消费统计',
          policy: 'LaborProtection.Employee.ConsumeStatistics',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/reportManagement/index.vue')
      },
      {
        path: '/laborProtection/monthlyStockSummary',
        name: 'monthlyStockSummary',
        meta: {
          title: '月备货汇总',
          // policy: 'LaborProtection.MonthSupplerMaterial',
          noCache: true
        },
        component: () => import('@/views/LaborProtection/monthlyStockSummary/index.vue')
      }
    ]
  },
  {
    path: '/laborProtection/couponManage',
    name: 'LaborProtection',
    component: Layout,
    alwaysShow: true,
    redirect: '/laborProtection/couponManage',
    meta: {
      title: '优惠券管理',
      icon: 'yhq',
      policy: 'LaborProtection.CouponRecord||LaborProtection.Coupon'
    },
    children: [
      {
        path: '/laborProtection/couponManage',
        name: 'coupon',
        meta: {
          title: '优惠券列表',
          policy: 'LaborProtection.Coupon',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/couponManage/index.vue')
      },
      {
        path: '/laborProtection/couponManage/couponRecord',
        name: 'couponRecord',
        meta: {
          title: '优惠券发放记录',
          policy: 'LaborProtection.CouponRecord',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/couponManage/couponRecord/index.vue')
      }
    ]
  },
  {
    path: '/laborProtection/costOrgRelation',
    name: 'LaborProtection',
    component: Layout,
    alwaysShow: true,
    redirect: '/laborProtection/costOrgRelation',
    meta: {
      title: '系统设置',
      icon: 'icon-xitong',
      policy:
        'LaborProtection.APICostOrgRelation||LaborProtection.Employee||LaborProtection.LoginLog||LaborProtection.UserAmountDisStandard'
    },
    children: [
      {
        path: '/laborProtection/costOrgRelation',
        name: 'costOrgRelation',
        meta: {
          title: '成本中心关系管理',
          policy: 'LaborProtection.APICostOrgRelation',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/costOrgRelation/index')
      },
      {
        path: '/costOrgRelation/insertOrupdateCost',
        name: 'insertOrupdateCost',
        meta: {
          title: '成本中心配置',
          // policy: 'LaborProtection.Employee',
          noCache: false
        },
        hidden: true,
        component: () => import('@/views/LaborProtection/costOrgRelation/insertOrupdateCost')
      },
      {
        path: '/laborProtection/amountStandard',
        name: 'amountStandard',
        meta: {
          title: '人员金额发放标准',
          policy: 'LaborProtection.UserAmountDisStandard',
          noCache: false
        },
        // hidden: true,
        component: () => import('@/views/LaborProtection/amountStandard/index')
      },
      {
        path: '/laborProtection/employeeInfo',
        name: 'employeeInfo',
        meta: {
          title: '员工信息列表',
          policy: 'LaborProtection.Employee',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/employeeInfo/index')
      },
      {
        path: '/laborProtection/login/loginLog',
        name: 'loginLog',
        meta: {
          title: '登录日志',
          policy: 'LaborProtection.LoginLog',
          noCache: false
        },
        component: () => import('@/views/LaborProtection/login/loginLog')
      }
    ]
  }
]
export default LaborProtection
